import 'package:flutter_test/flutter_test.dart';
import 'package:beng_beng_utils/beng_beng_utils.dart';
import 'package:beng_beng_utils/beng_beng_utils_platform_interface.dart';
import 'package:beng_beng_utils/beng_beng_utils_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockBengBengUtilsPlatform
    with MockPlatformInterfaceMixin
    implements BengBengUtilsPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final BengBengUtilsPlatform initialPlatform = BengBengUtilsPlatform.instance;

  test('$MethodChannelBengBengUtils is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelBengBengUtils>());
  });

  test('getPlatformVersion', () async {
    BengBengUtils bengBengUtilsPlugin = BengBengUtils();
    MockBengBengUtilsPlatform fakePlatform = MockBengBengUtilsPlatform();
    BengBengUtilsPlatform.instance = fakePlatform;

    expect(await bengBengUtilsPlugin.getPlatformVersion(), '42');
  });
}
